<template>
  <div class="login-container">
    <div class="logo">
      <img src="@/assets/Login/logo.png" alt="" />
    </div>
    <div class="main-area">
      <div class="header">
        <div class="title">密码登录</div>
        <img src="@/assets/Login/qrcode.png" alt="" />
      </div>

      <input type="text" class="account" placeholder="请输入账号" />

      <input type="password" class="pwd" placeholder="请输入密码" />

      <div class="auth-code">验证码登录</div>

      <div class="slider">
        <div class="text">向右拖动滑块开始验证</div>
        <mySlider v-model="value" :show-tooltip="false"></mySlider>
      </div>

      <div class="login">登录</div>

      <div class="desc">
        登录即视为阅读并同意
        <span>《名扬网络云服务用户协议》</span>
        和
        <span>《名扬网络云服务隐私政策》</span>
      </div>
    </div>

    <BottomBar />
  </div>
</template>

<script>
import mySlider from "@/components/my-elementui/my-components/my-slider";
import BottomBar from "@/components/BottomBar";
export default {
  components: {
    BottomBar,
    mySlider,
  },
  data() {
    return {
      value: 0,
    };
  },
};
</script>

<style scoped lang="less">
@import "~@/styles/var.less";
.login-container {
  position: relative;
  width: 100%;
  height: 1080px;
  background: url("~@/assets/Login/bg.png");
  color: #fff;

  .logo {
    width: 100%;
    height: 64px;
    box-sizing: border-box;
    padding-top: 16px;
    padding-left: 360px;
    img {
      width: 148px;
      height: 32px;
      object-fit: cover;
    }
  }

  .main-area {
    width: 384px;
    display: flex;
    flex-direction: column;
    margin-left: 360px;
    box-sizing: border-box;
    margin-top: 209px;
    .header {
      display: flex;
      justify-content: space-between;
      height: 66px;
      line-height: 66px;
      font-weight: 500px;
      font-size: 36px;
      margin-bottom: 30px;
      img {
        width: 66px;
        height: 66px;
        object-fit: cover;
      }
    }

    input {
      color: #fff;
      height: 38px;
      outline: none;
      border: none;
      background-color: inherit;
      border-bottom: 1px solid rgba(255, 255, 255, 0.4);
      &:focus {
        border-bottom: 1px solid #ffffff;
      }
    }

    .account {
      margin-bottom: 24px;
    }

    .pwd {
      margin-bottom: 12px;
    }

    .auth-code {
      display: flex;
      justify-content: flex-end;
      font-size: 14px;
      cursor: pointer;
    }

    .slider {
      position: relative;
      // 滑动条的范围0-100，按钮的范围0-85
      // 限制按钮的位置，防止按钮超出滑动条
      // if (this.newPosition > 85) {
      //   this.newPosition = 85;
      // }
      /deep/.el-slider__runway {
        width: 100%;
        height: 48px;
        background: rgba(255, 255, 255, 0.1);
      }
      /deep/.el-slider__button-wrapper {
        width: 60px;
        height: 48px;
        top: 0;
      }
      /deep/.el-slider__button {
        position: absolute;
        width: 60px;
        height: 48px;
        border: none;
        border-radius: 4px;
      }
      /deep/.el-slider__bar {
        height: 48px;
        background-color: #1fc45f;
        border-top-left-radius: 4px;
        border-bottom-left-radius: 4px;
        position: absolute;
      }
      .text {
        position: absolute;
        font-size: 14px;
        top: 30px;
        left: 120px;
      }
    }

    .login {
      margin-top: 12px;
      margin-bottom: 16px;
      height: 56px;
      line-height: 56px;
      text-align: center;
      cursor: pointer;
      background: @primary;
      border-radius: 4px;
    }

    .desc {
      color: rgba(255, 255, 255, 0.4);
      font-size: 14px;
      span {
        color: #fff;
      }
    }
  }

  .bottombar-container {
    position: absolute;
    bottom: 0;
    background-color: inherit;
  }
}
</style>